﻿@model MerchantTribeStore.Models.CategoryPageViewModel
@Html.Raw(ViewBag.BreadCrumbsFinal)
<div id="categoryleft">
    @Html.Raw(ViewBag.Filters)
</div>
<div id="categorymain">
    @if (Model.LocalCategory.ShowTitle)
    {
        <h1>@Model.LocalCategory.Name</h1>
    }
    @if (ViewBag.ShowBanner == true && (string)ViewBag.Key==string.Empty)
    {
        <div id="categorybanner">
            <img src="@ViewBag.BannerUrl" alt="@Model.LocalCategory.Name" />
        </div>
    }    
    @if (((string)ViewBag.DisplayHtml).Length > 0 && (string)ViewBag.Key==string.Empty)
    {        
        <div id="categorydescription">
            @Html.Raw(ViewBag.DisplayHtml)
        </div>
    }    
    <div id="categorygridtemplate">            
        <div id="categorygridtemplaterecords">
            @Html.Partial("~/Views/Shared/_Pager.cshtml", Model.PagerData)
            @foreach (var item in Model.Products)
            {
                @Html.Partial("~/Views/Products/RenderSingleProduct.cshtml", item)
            }
            @Html.Partial("~/Views/Shared/_Pager.cshtml", Model.PagerData)
            <div class="clear"></div>
        </div>
    </div>
</div>
<div class="clear"></div>